<html>

<head>

<script type="text/javascript" src="/olap-test/jquery-1.2.3.min.js"></script>

<script type="text/javascript">

function updateTables() {
	waiting();
    $.get("/olap-test/olap.do", { product: ""}, function(data) {
  		$("#stuff").attr("innerHTML", data);
  		complete();
	});
}

function changeProdDrop(sel) {
	waiting();
	var prodVal=sel.options[sel.selectedIndex].id;
	$.get("/olap-test/olap.do", { product: prodVal }, function(data){
  		$("#stuff").attr("innerHTML", data);
  		complete();
	});
}

function initialzeProdDrop() {
	$.get("/olap-test/olapdropdown.do",function(data){
  		$("#prodDrop").attr("innerHTML", data);
	});
}


function waiting() {
	document.body.style.cursor='wait';
	document.getElementById("status").innerHTML="Loading..... Please wait.";
}

function complete() {
	document.body.style.cursor='default';
	document.getElementById("status").innerHTML="";
}


</script>
</head>
<body>

<div id="stuff"></div>

<div id="prodDrop">
	<select> </select>
</div>
<br/>
<div id="status"/></div>
</body>

<script>

initialzeProdDrop();
updateTables();
</script>
</html>




